<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?php echo MVC_WEB_NAME;?></title>
<?php echo $js;?>
<?php echo $css;?>
<script type="text/javascript">
function get_search()
{
   
	$("#search_input").removeClass("search_input");
    $("#search_input").addClass("search_input_click");
    
    
	  
    
}
function clear_search()
{
	$("#search_input").removeClass("search_input_click");
    $("#search_input").addClass("search_input");
  
    
}
function ajax_search()
{
	
}
function check_search()
{
	var s = $.trim($("#search_input").val());
	if(s!='' && s){
		$("#search").submit();
	}
	return false;
	
}
function show_child(name)
{
	
	$("#menu_ul_child_"+name).show();
}
function hide_child(name)
{
	
	$("#menu_ul_child_"+name).hide();
}
function move_tips(id,to){

	var data = $("#"+id).html();
	
	$("#"+id).animate({ 
		opacity: 0.1,	    
	    height: 'toggle'
		},function(e){
			 $("#"+id).remove();
			 $('#'+to+'_tips').append('<div id="'+id+'" class="'+id+'" style="display:none">' + data + '</div>');
			 
			 if(to=='up'){
				 $('#move_tips_down_btn').html('I already know');
			 }else{
				 $('#move_tips_down_btn').html('Show on top');
			 }
			 
			 $('#move_tips_down_btn').unbind('click').removeAttr('onclick');
			 $('#move_tips_down_btn').click(function(e){
				 if(to=='up'){
					 move_tips(id,'down');
				 }else{
					 move_tips(id,'up');
				 }
			 });
			 $("#"+id).animate({ 
				 height: 'toggle'
			 })
		} );
}

</script>
</head>
<body>

	<div class="wrap">
		<div class="menu">
			<div class="menu_l"></div>
			<div class="menu_m">

				<ul class="menu_ul">
					<li><a href="<?php echo MVC_WWW_HOST?>"  class="logo"> &nbsp;</a></li>
					<li <?php if (Http::get('module')=='library'){echo 'class="menu_parent_li_on"';}else{echo 'class="menu_parent_li"';}?> onmouseover="show_child('Library')"
						onmouseout="hide_child('Library')"><a href="<?php echo MVC_WWW_HOST?>library/index"
						class="menu_parent_li_pa">Library</a>
						<ul id="menu_ul_child_Library" class="menu_ul_child">
							<li class="menu_parent_li_child"><a href="<?php echo MVC_WWW_HOST?>library/index">Questions</a></li>
							<li class="menu_parent_li_child"><a href="<?php echo MVC_WWW_HOST?>library/add">Add questions</a></li>
						</ul></li>
					<li <?php if (Http::get('module')=='quiz'){echo 'class="menu_parent_li_on"';}else{echo 'class="menu_parent_li"';}?> 
                        onmouseover="show_child('Quiz')"
						onmouseout="hide_child('Quiz')"><a href="<?php echo MVC_WWW_HOST?>quiz/index"
						class="menu_parent_li_pa">Quiz</a>
						<ul id="menu_ul_child_Quiz" class="menu_ul_child">
							<li class="menu_parent_li_child"><a href="<?php echo MVC_WWW_HOST?>quiz/index">Quizes</a></li>
							<li class="menu_parent_li_child"><a href="<?php echo MVC_WWW_HOST?>quiz/add">Add a quiz</a></li>
						</ul></li>
					<li <?php if (Http::get('module')=='report'){echo 'class="menu_parent_li_on"';}else{echo 'class="menu_parent_li"';}?> >
					<a class="menu_parent_li_pa" href="<?php echo MVC_WWW_HOST?>report">Report</a></li>
					<li <?php if (Http::get('module')=='user'){echo 'class="menu_parent_li_on"';}else{echo 'class="menu_parent_li"';}?>>
					<a class="menu_parent_li_pa" href="<?php echo MVC_WWW_HOST.'user'?>">Users</a>
					</li>
					<li <?php if (Http::get('module')=='system'){echo 'class="menu_parent_li_on"';}else{echo 'class="menu_parent_li"';}?>>
					<a class="menu_parent_li_pa" href="<?php echo MVC_WWW_HOST.'system'?>">System</a></li>
				</ul>
				<div class="search">
					<form id="search" name="search"
						action="<?php echo MVC_WWW_HOST.'search/'?>" method="get"
						onsubmit="return check_search()">
						<input id="search_input" name="q" class="search_input"
							onclick="get_search()" onblur="clear_search()"
							onkeypress="ajax_search()" />&nbsp;
							<input type="submit" class="search_submit" value="Search" />
					</form>
				</div>

			</div>
			<div class="menu_r"></div>
		</div>
		<div class="clear"></div>